package org.jeecg.modules.paycenter.pay.dto;

import lombok.Data;

@Data
public class PayResult {
    private boolean success;
    private String respSource;
    private String respCode;
    private String respInfo;
    private String rxtInfo;

    public static PayResult ok() {
        PayResult ret = new PayResult();
        ret.setSuccess(true);
        return ret;
    }

    public static PayResult error(String respSource, String respCode, String respInfo) {
        PayResult ret = new PayResult();
        ret.setSuccess(false);
        ret.setRespSource(respSource);
        ret.setRespCode(respCode);
        ret.setRespInfo(respInfo);
        return ret;
    }

    public static PayResult error(String respSource, String respCode, String respInfo, String rxtInfo) {
        PayResult ret = new PayResult();
        ret.setSuccess(false);
        ret.setRespSource(respSource);
        ret.setRespCode(respCode);
        ret.setRespInfo(respInfo);
        ret.setRxtInfo(rxtInfo);
        return ret;
    }
}
